A technology in which a conventional information processing device (for example, a personal computer) that connects to multiple devices (external devices) obtains information by accessing these devices and performs data processing is widely known (for example, see Japanese laid-open patent application number 2006-92296). When the information processing device performs data processing, the information processing device accesses data through a control program that corresponds the device and a data object that corresponds to the data to be accessed.
However, the control program is a device-specific program. Every time the device to be accessed is changed, a user searches for a control program that corresponds to the changed device to be controlled in the information processing device and runs the control program. This is burdensome for the user.
An object of the present invention is to provide an information processing device that can control a target device with simple operation and without a significant burden on the user.
Accordingly, an information processing device that transmits and receives information to and from plural devices that are coupled to the information processing device in the present application includes: a memory unit storing a control program that corresponds to each of the devices; an acquisition unit for acquiring device information from a selected one of the devices; a determination unit for determining whether the selected device is controllable based on the acquired device information; a reading unit for reading a control program from the memory unit that corresponds to the selected device, if the determination unit determines that the selected device is controllable; a command generation unit for generating commands for the selected device using the control program read by the reading unit; and a transmission control unit for transmitting commands generated by the command generation unit to the corresponding device, wherein the transmission control unit transmits a set of the commands generated by the command generation unit in a block.
In another aspect, an information processing device that transmits and receives information to and from plural devices that are coupled to the information processing device in the present application includes: a memory unit for storing control programs that correspond to each of the devices; a command memory unit for storing command sets that correspond to each of the devices; an acquisition unit for acquiring device information from a selected one of the devices; a determination unit for determining whether the selected device is controllable based on the acquired device information; a reading unit for reading one of the control programs from the memory unit and one of the command sets from the command memory unit that correspond to the selected device, if the determination unit determines that the selected device is controllable; a command generation unit for generating commands for the selected device using the control program and command set that are read by the reading unit; and a transmission control unit for transmitting the commands generated by the command generation unit to the corresponding device, wherein the transmission control unit transmits a set of commands generated by the command generation unit in a block.
In another aspect, the present application discloses a method of operating an information processing device that transmits and receives information to and from plural devices that are connected to the information processing device, wherein the method including: storing a control program that corresponds to each of the devices in a memory unit; acquiring device information from a selected one of the devices; determining whether the selected device is controllable based on the acquired device information; reading a control program that corresponds to the selected device from a memory unit, if the determination unit determines that the selected device is controllable; generating commands for the selected device; and transmitting the generated commands to the corresponding device in a block.
In the present invention, a control program, which corresponds to device information obtained from a target device to be controlled, is automatically selected from control programs stored in advance in a memory unit and is executed. Therefore, a user can control the target device with simple operation by specifying the device to be controlled. When a control program is added, a completely new device that has a different specification can easily be controlled. Because a set of commands is transmitted in a block (or a unit) to the device without a transmission check for each command according to one transmission instruction at the time of data transmission, effective data communication is performed.